﻿<!-- #include file="mymin.asp" -->
<card title="发送消息"><p>
<%

dim id,a,rs,sql

id=getN("id",0)
a=getN("a",0)

if a=0 then
	set rs=Server.CreateObject("ADODB.Recordset")
	sql = "select name from 74hu_user where id="&id
	rs.open sql,myconn,1,1
	If Not rs.eof Then
		w "会员:"&nowml(rs("name"))&" (ID:"&id&")<br/>内容:<input name='msg"&time_r&"'/><br/>"&_
			"<anchor>发送消息<go method='post' href='msg.asp?sid="&sid&"&amp;a=1&amp;id="&id&"'>"&_
			"<postfield name='msg' value='$(msg"&time_r&")'/></go></anchor>"'以后补充消息类型
	Else
		w "iD:"&id&"会员不存在！"
	end if
	rs.close
	set rs=nothing
elseif a=1 then
	Dim msg
	msg=getD("msg","")
	If msg<>"" Then
		' myconn.Execute("insert into 74hu_message (userid,receive,savetime,content,state,flag)values(1,"&id&",'"&time_now&"','"&msg&"',0,0)")
		Call sendMsgToUser(id,msg)
		w "发送成功!"
	Else
		w "消息内容不能为空!"
	End If
else
	w "操作失败!"
end if

w "<br/><a href=""detail.asp?sid="&sid&"&amp;id="&id&""">返回管理</a><br/>----------<br/><a href='detail.asp?sid="&sid&"&amp;id="&id&"'>[会员管理]</a>"
call bbsLast
%>